package com.example.bean2;

import org.springframework.beans.factory.FactoryBean;

public class PigFactoryBean implements FactoryBean<Pig> {
    @Override
    public Pig getObject() throws Exception {
        return new Pig();
    }

    @Override
    public Class<?> getObjectType() {
        return Pig.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
